package com.msb.controller;

import com.msb.pojo.Person;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author wuJiaWei
 * @version 1.0
 * 控制器类
 */
@Controller
public class TestController {
    @RequestMapping("/test1")
    public String test1(){
        //响应给浏览器index.jsp页面：
        return "index.jsp";
    }

    @RequestMapping("/testParam")
    public String testParam(String name,int age){
        System.out.println(name+" "+age);
        return "index.jsp";
    }
    @RequestMapping("/testParam2")
    public String testParam2(Person person){
        System.out.println(person.getName()+" "+person.getAge()+" "+person.getScore());
        return "index.jsp";
    }


}
